package com.hotline.communication.enums;


public enum RecordOperationTypeEnum {
    //录音操作类型： 1开始录音   2结束录音   4（外呼失败），类型3（转外线成功）

    START_RECORD(1,"开始录音"),

    RERECORD(2,"重新录音"),

    END_RECORD(3,"结束录音"),

    CALL_FAILED(4,"外呼失败");
    /**
     * 编码
     */
    private Integer code;

    /**
     * 名称
     */
    private String name;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }



    RecordOperationTypeEnum(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    public static RecordOperationTypeEnum getRecordOperationTypeEnum(Integer code){
        for (RecordOperationTypeEnum recordOperationTypeEnum : RecordOperationTypeEnum.values()){
            if(recordOperationTypeEnum.getCode().equals(code)){
                return recordOperationTypeEnum;
            }
        }
        return null;
    }

}
